gdk/wayland: Always map windows 'moved-to-rect' as popups
authorMatthias Clasen <mclasen@redhat.com>
Sun, 19 Aug 2018 01:16:51 +0000 (01:16 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 19 Aug 2018 01:26:20 +0000 (01:26 +0000)
Only popups can make use of the move-to-rect semantics so it makes no
sense to try anything other surface type.

gdk/wayland/gdksurface-wayland.c

index af12fa8290d759fbc6526a3c414ffed0d35120b4..d8d2a02d0b05c3be076bd7498797170ccad776d2 100644 (file)
@@ -1569,6 +1569,8 @@ gdk_wayland_surface_handle_configure_popup (GdkSurface *surface,
                                   &flipped_x,
                                   &flipped_y);
 
+  impl->position_method = POSITION_METHOD_MOVE_TO_RECT;
+
   g_signal_emit_by_name (surface,
                          "moved-to-rect",
                          &flipped_rect,
@@ -2467,6 +2469,9 @@ should_map_as_popup (GdkSurface *surface)
       break;
     }
 
+  if (impl->position_method == POSITION_METHOD_MOVE_TO_RECT)
+    return TRUE;
+
   return FALSE;
 }